package org.ubc.cs410.disposal2020.server;

import java.util.HashMap;
import java.util.Map;

import org.ubc.cs410.disposal2020.Player;

public class GameCache {

	private static GameCache gameCache;

	private Map<String, Player> playerMap;

	private GameCache() {
		playerMap = new HashMap<String, Player>();
	}

	public Map<String, Player> getPlayerMap() {
		return playerMap;
	}

	public void setPlayerMap(Map<String, Player> playerMap) {
		this.playerMap = playerMap;
	}

	public static GameCache getInstance() {
		if (gameCache == null) {
			gameCache = new GameCache();
		}
		return gameCache;
	}

}
